getBalanceAsOfDate

fun getBalanceAsOfDate(book: AccountBook, account: Account, asofDate: Int): Long

Get a single account's balance as of a given date. Transactions for that date will be included, so it is the balance as of the end of the given date. The balance will be in the account's currency type.

This method will return 0 if the account did not exist as of the given date.

Return

The balance (in the account's currency) of the given account as of the end of the given date.

Parameters

book

The account book.

account

Account to obtain the balance for.

asofDate

The date to obtain the balance for.


fun getBalanceAsOfDate(book: AccountBook, account: Account, asofDate: Int, outOfDateAsZero: Boolean): Long

Get a single account's balance as of a given date. Transactions for that date will be included, so it is the balance as of the end of the given date. The balance will be in the account's currency type.

Return

The balance (in the account's currency) of the given account as of the end of the given date.

Parameters

book

The account book.

account

Account to obtain the balance for.

asofDate

The date to obtain the balance for.

outOfDateAsZero

True if out-of-date returns a zero balance, false if it returns a Long.MIN_VALUE if the account did not exist.